package com.maiji.cloud.response.shopingmall;

import com.maiji.cloud.entities.shopingmall.ShareOrderHelpLog;
import com.maiji.cloud.response.login.ActivityShareRuleConfigResData;
import com.maiji.cloud.response.login.UserInfoResData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang.StringUtils;
import java.util.Date;
import java.util.List;

@NoArgsConstructor
@Data
@Accessors(chain = true)
public class ShareOrderLogResData {

    @ApiModelProperty(value="是否可以订单返现")
    private Boolean ifCan; //

    @ApiModelProperty(value="主键")
    private String uuId; //

    @ApiModelProperty(value="活动发起者ID")
    private String userId; //

    @ApiModelProperty(value="订单ID")
	private String orderId; //

    @ApiModelProperty(value="用户信息")
	private UserInfoResData userInfo; //

    @ApiModelProperty(value="订单金额")
    private Double orderMoney; //

    @ApiModelProperty(value="最大返现金额")
    private Double maxReturMoney; //

    @ApiModelProperty(value="现已助力返现总金额")
    private Double nowReturMoney; //

    @ApiModelProperty(value="分享时间")
	private Date shareTime; //

    @ApiModelProperty(value="助力活动结束时间")
	private Date endTime; //

    @ApiModelProperty(value="当前用户是否可助力")
	private Boolean canHelp; //

    @ApiModelProperty(value="是否为当前用户发起的活动")
	private Boolean isMine; //

    @ApiModelProperty(value="是否结算")
    private Boolean settlement; //

    @ApiModelProperty(value="用户助力列表")
	private List<ShareOrderHelpLog> helpList;

    @ApiModelProperty(value="订单信息")
    private ShopingOrderResData order;

    @ApiModelProperty(value="助力规则")
    private ActivityShareRuleConfigResData ruleConfigResData;

    @ApiModelProperty(value="域名")
    private String realmName;

    @ApiModelProperty(value="跳转地址")
    private String resultUrl = "/pages/orderPay/orderPayShare?uuId=";

    public String getResultUrl() {
        if (StringUtils.isBlank(realmName)) return null;
        return realmName + resultUrl + orderId;
    }

}
